import os

# 获取当前目录
os_cwd = os.getcwd()
print(os_cwd)

os_abs = os.path.abspath('test3.txt') #获取相对路劲的绝对路劲
print(os_abs)
os_split = os.path.split(os_abs)
print(os_split)
os_ext = os.path.splitext(os_abs)
print(os_ext)